home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
text
/
edit
/
gad4ged4.lha
/
gad4ged4
/
arexx
/
sc
/
smake.ged
< prev
Wrap
Text File
|
1996-10-03
|
3KB
|
112 lines
/* smake.ged V1.01 inspired by dmake.ged of Dietmar Eilert
written in 1994 by Roland Schwingel
Lilienthalstraße 9
92421 Schwandorf
Germany
Description:
Calls smake utility (SAS/C).
When there is a makefile in the current drawer then 'smake'
is invoked ELSE the current file is compiled using 'sc'.
Changes:
looks for "smakefile" (koessi)
*/
IF (Left(ADDRESS(), 6) ~= "GOLDED") THEN /* not started BY GoldEd ? */
ADDRESS 'GOLDED.1'
OPTIONS RESULTS /* enable RETURN codes */
'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
OPTIONS FAILAT 25 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean EXIT */
SIGNAL ON ERROR
/* ------------------------- INSERT YOUR CODE HERE: -------------------- */
ARG scopts
PARSE SOURCE xtype xresults xcalled xresolved xextension xhost
CALL SetClip('first_error_file')
CALL SetClip('prev_error_file' )
CALL SetClip('first_error_line')
CALL SetClip('prev_error_line' )
IF Show('P', 'SC_SCMSG') THEN DO
ADDRESS 'SC_SCMSG' 'Quit'
END
'QUERY CAT'
IF (RESULT = "deutsch") THEN DO
savebody = "Datei wurde verändert. Speichern ?"
savebutt = "Speichern|Nicht speichern"
donebutt = "Fertig"
fail_msg = ": Tragische Fehler - Kompilieren ging daneben"
cont_msg = "Weiter mit return ..."
END
ELSE DO
savebody = "File has been changed. Save it ?"
savebutt = "Save|Do not save"
donebutt = "Ready"
fail_msg = ": Fatal Errors - compiling failed"
cont_msg = "Press return to continue ..."
END
/* cpu = 'etc:util/boot/set040' */
make = 'sc:c/smake '||scopts
cc = 'sc:c/sc BUILDPROJECT'
'QUERY MODIFY'
IF (RESULT = 'TRUE') THEN DO
'REQUEST TITLE="'||xcalled||'" BODY="'||savebody||'" BUTTON="'||savebutt||'"'
IF (RESULT = 1) THEN
'SAVE ALL'
END
'QUERY PATH'
pfad = RESULT
CALL Pragma('D', pfad)
'DIR "'||pfad||'"'
IF Exists('smakefile') THEN DO
'UNLOCK'
DRESS COMMAND make
SIGNAL NOERROR
END
ELSE
DO
'UNLOCK'
DRESS COMMAND cc
IF RC = 0 THEN DO
'REQUEST TITLE="'||xcalled||'" BODY="'||cc||'" BUTTON="'||donebutt||'"'
SIGNAL READY
END
END
ERROR:
SAY '0a'x||'0a'x||'9b'x||'33m'||xcalled||fail_msg
NOERROR:
SAY '9b'x||'32m'||cont_msg
PULL dummy
READY:
/* ---------------------------- END OF YOUR CODE ----------------------- */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ErrorText(RC) ":-("
ADDRESS 'GOLDED.1' 'UNLOCK'
EXIT